﻿@model IEnumerable<CloudFranceTriple.Models.VeteranWall>

@{
    ViewBag.Title = CloudFranceTriple.WebRole.Properties.Resources.VeteranWallTitleByPseudo;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">

    <h1><a href="/member/veteranwall">@CloudFranceTriple.WebRole.Properties.Resources.VeteranWallTitleByPeriod</a>
        <span>- </span>@CloudFranceTriple.WebRole.Properties.Resources.VeteranWallTitleByPseudo
    </h1>
    <section>
        @if (User.IsInRole("RollVeteranWall"))
        {
            <p>
                @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.VeteranCreate, "Create", "VeteranWorkforce", new { area = "Member" }, null)
            </p>
        }
        <table>
            <tr>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranPseudo
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranStatus
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranPeriodStart
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranPeriodEnd
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranComment
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.VeteranAuthor
                </th>
                <th></th>
            </tr>

            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.Pseudo)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.VeteranStatus.Label)
                    </td>
                    <td>
                        @Html.DisplayFor(model => item.VeteranWallPeriod.VeteranWallPeriodLabel)
                    </td>
                    <td>
                        @Html.DisplayFor(model => item.VeteranWallPeriod1.VeteranWallPeriodLabel)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Comment)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Author)
                    </td>
                    <td>
                        @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.ButtonDetails, "Details", new { id = item.Id })
                        @if (User.IsInRole("RollVeteranWall"))
                        {
                            <span>| @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.ButtonEdit, "Edit", new { id = item.Id }) |
                                @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.ButtonDelete, "Delete", new { id = item.Id })
                            </span>
                        }
                    </td>
                </tr>
            }

        </table>
    </section>
</div>
